package com.prs.crm.domain.hr;

import java.util.Date;
import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.prs.crm.annotation.DomainRelation;
import com.prs.crm.annotation.DomainRelations;
import com.prs.crm.domain.BaseEntity;

import com.prs.crm.domain.cqunicom.Company;
import com.prs.crm.domain.oa.bookmanager.BorrowRegister;
import com.prs.crm.domain.oa.schedule.MyThings;
import com.prs.crm.domain.oa.schedule.OthersThings;

@Entity
@Table(name = "hr_person")
@DomainRelations(relations = { @DomainRelation(rely = "com.prs.crm.domain.hr.PayrollBill", property = "person") })
public class Person extends BaseEntity {

	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;
	private String loginCode;
	private String loginPwd;
	private String email;
	@ManyToOne
	private Resume resume;
	/**个人文件柜可用空间*/
	private String fileUseSpace;
	/**电子邮件可用空间*/
	private String emailUseSpace;
	/**上传最大容量*/
	private String uploadMaxVolume;

//	@OneToMany(fetch=FetchType.LAZY,mappedBy="receivePerson")
//	private Set<OthersThings> things;
	
	@ManyToOne
	private Dept dept;
	@ManyToOne
	private Role role;
	private Date creattime;
	private String personcode;
	@Lob
	private String remark;
	@ManyToOne
	private Salary salary;
	private Integer tstate;
	private String tableName;
	private String baseName;
	@Lob
	private String allfieldname;
	

	private String state;

	/**
	 * 所属区域
	 * 
	 * @return
	 */
	private String address;

	/**
	 * 用户工号
	 * 
	 * @return
	 */
	private String userNumber;
	/**
	 * 电子邮件
	 * 
	 * @return
	 */
	private String userEmail;
	/**
	 * 联系电话
	 * 
	 * @return
	 */
	private String userTel;
	/**
	 * 所属公司
	 * 
	 * @return
	 */
	private String userCom;
	/**
	 * 真实姓名
	 * 
	 * @return
	 */
	private String userName;
	/**
	 * 是否标记有效
	 * 
	 * @return
	 */
	private String markName;

	/**
	 * 角色类型
	 * 
	 * @return
	 */
	private String userStyle;
	@ManyToOne
	private Company companys;

	/**
	 * 上级领导
	 * 
	 * @return
	 */
	private String supLead;
	private String supLeadId;
	/**
	 * 下属
	 * 
	 * @return
	 */
	private String subordinate;
	private String subordinateId;
	
	public Integer getTstate() {
		return tstate;
	}

	public void setTstate(Integer tstate) {
		this.tstate = tstate;
	}

	public String getTableName() {
		return tableName;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	public String getBaseName() {
		return baseName;
	}

	public void setBaseName(String baseName) {
		this.baseName = baseName;
	}

	public String getSupLead() {
		return supLead;
	}

	public void setSupLead(String supLead) {
		this.supLead = supLead;
	}

	public String getSupLeadId() {
		return supLeadId;
	}

	public void setSupLeadId(String supLeadId) {
		this.supLeadId = supLeadId;
	}

	public String getSubordinate() {
		return subordinate;
	}

	public void setSubordinate(String subordinate) {
		this.subordinate = subordinate;
	}

	public String getSubordinateId() {
		return subordinateId;
	}

	public void setSubordinateId(String subordinateId) {
		this.subordinateId = subordinateId;
	}

	public Company getCompanys() {
		return companys;
	}

	public void setCompanys(Company companys) {
		this.companys = companys;
	}

	public String getFileUseSpace() {
		return fileUseSpace;
	}

	public void setFileUseSpace(String fileUseSpace) {
		this.fileUseSpace = fileUseSpace;
	}

	public String getEmailUseSpace() {
		return emailUseSpace;
	}

	public void setEmailUseSpace(String emailUseSpace) {
		this.emailUseSpace = emailUseSpace;
	}

	public String getUploadMaxVolume() {
		return uploadMaxVolume;
	}

	public void setUploadMaxVolume(String uploadMaxVolume) {
		this.uploadMaxVolume = uploadMaxVolume;
	}

	public String getUserStyle() {
		return userStyle;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public void setUserStyle(String userStyle) {
		this.userStyle = userStyle;
	}

	public String getMarkName() {
		return markName;
	}

	public void setMarkName(String markName) {
		this.markName = markName;
	}

	public String getAddress() {
		return address;
	}

	
	public void setAddress(String address) {
		this.address = address;
	}

	public String getUserNumber() {
		return userNumber;
	}

	public void setUserNumber(String userNumber) {
		this.userNumber = userNumber;
	}



	public String getUserEmail() {
		return userEmail;
	}

	public void setUserEmail(String userEmail) {
		this.userEmail = userEmail;
	}

	public String getUserTel() {
		return userTel;
	}

	public void setUserTel(String userTel) {
		this.userTel = userTel;
	}

	public String getUserCom() {
		return userCom;
	}

	

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public void setUserCom(String userCom) {
		this.userCom = userCom;
	}

	

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getLoginPwd() {
		return loginPwd;
	}

	public void setLoginPwd(String loginPwd) {
		this.loginPwd = loginPwd;
	}

	public Resume getResume() {
		return resume;
	}

	public void setResume(Resume resume) {
		this.resume = resume;
	}

	public Dept getDept() {
		return dept;
	}

	public void setDept(Dept dept) {
		this.dept = dept;
	}

	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

	public void setCreattime(Date creattime) {
		this.creattime = creattime;
	}

	public Date getCreattime() {
		return creattime;
	}

	public String getPersoncode() {
		return personcode;
	}

	public void setPersoncode(String personcode) {
		this.personcode = personcode;
	}

	public static long getSerialVersionUID() {
		return serialVersionUID;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getRemark() {
		return remark;
	}

	public void setLoginCode(String loginCode) {
		this.loginCode = loginCode;
	}

	public String getLoginCode() {
		return loginCode;
	}

	public void setSalary(Salary salary) {
		this.salary = salary;
	}

	public Salary getSalary() {
		return salary;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getState() {
		return state;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getAllfieldname() {
		return allfieldname;
	}

	public void setAllfieldname(String allfieldname) {
		this.allfieldname = allfieldname;
	}

//
//	public Set<OthersThings> getThings() {
//		return things;
//	}
//
//	public void setThings(Set<OthersThings> things) {
//		this.things = things;
//	}
//

}
